<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页面</title>
</head>
<body>
<%out.println("------homePage------"); %><br>
	<form name = "fm" action = "submit" method = "post">
		<table>
			<tr>
				<td>name:</td>
				<td>
					<input type = "text" name = "userName" id = "userName">
				</td>
			</tr>
			<tr>
				<td>password:</td>
				<td>
					<input type = "password" name = "pwd" id = "pwd">
				</td>
			</tr>
			
		</table>
		<br>
		role:
		<select name = "role">
				<option value = "student">student</option>
				<option value = "manager">manager</option>
		</select>
		<br><br>
		<!-- <input type = "radio" name = "role" id = "manager" value = "manager">manager<br>
		<input type = "radio" name = "role" id = "student" value = "student" checked = "checked">student<br> -->
		<input type = "radio" name = "save" id = "save" value = "是" >&nbsp;&nbsp;是否保存用户名和密码?<br><br>
		<input type = "button" name = "button1" value = "register" onClick = "register()">
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type = "button" name = "button2" value = "submit" onClick = "submit_m()"><br>
		<input type = "submit" value = "提交">
	</form>
</body>
</html>
<script>
	function register(){
		document.fm.action = "d2018.3.29_register.jsp";
		document.fm.submit();
	}
	function submit_m(){
		document.fm.method = "post";
		document.fm.action = "d2018.3.29_submit.jsp";
		document.fm.submit();
	}
</script>